package com.gxa.service.parking.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gxa.entity.parking.ParkingSituation;
import com.gxa.mapper.parking.ParkingSituationMapper;
import com.gxa.service.parking.ParkingSituationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ParkingSituationServiceImpl extends ServiceImpl<ParkingSituationMapper, ParkingSituation> implements ParkingSituationService {

    @Autowired
    private ParkingSituationMapper parkingSituationMapper;
    @Override
    public PageInfo<ParkingSituation> selectAll(Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ParkingSituation> parkingSituations = parkingSituationMapper.selectAll();
        PageInfo<ParkingSituation> parkingSituationPageInfo = new PageInfo<>(parkingSituations);

        return parkingSituationPageInfo;
    }


}
